package com.liuyuncen.repository;

import com.liuyuncen.entity.Eoc;
import com.liuyuncen.entity.Feature;
import com.liuyuncen.entity.Svo;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @Description TODO
 * @Author xhl
 * @Date 2023/7/11 10:02
 **/
public interface EocRepository extends Neo4jRepository<Eoc, Long> {

    /**
     * 根据svo code
     * @param code
     * @return 特征清单
     */
    @Query("match p=(n:Eoc)-[r:eoc_feature]->(n1:Feature) where n.name=$code  return n1")
    List<Feature> findFeatureByCode(@Param("code") String code);
}
